#!/usr/bin/env python
import sys

for line in sys.stdin:
    num = int(line)
    if num == 42:
        break;
    print num
